package timer

import(
	"time"
)

type Timer struct{
	startTime time.Time
	endTime   time.Time
}

func (ti *Timer) Begin() {
	ti.startTime = time.Now()
}

func (ti *Timer) Stop() (dura time.Duration) {
	ti.endTime = time.Now()
	dura = ti.endTime.Sub(ti.startTime)
	return
}